<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="inc/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <%@ include file="inc/meta.jsp" %>
    <meta name="description" content="">
    <meta name="author" content="">
    <title>控制面板</title>
    <%@ include file="inc/css.jsp" %>
</head>

<style>
    .textAling {
        text-align: center;
    }
</style>

<body>

<div id="posts" class="wrapper">
    <%@ include file="inc/nav.jsp" %>
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header" style="text-align: center;">${sessionScope.menu_sysUser.account}，欢迎进入精诚水务后台管理系统</h1>
            </div>
            <!-- /.col-lg-12 -->
        </div>

        <c:if test="${sessionScope.menu_sysUser.role.id == 1}">
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <a href="backend/appUser/index" class="btn btn-outline btn-primary btn-lg" role="button">新增会员（${appUserNum}）</a>
                            <a href="backend/wxUser/index" class="btn btn-outline btn-primary btn-lg" role="button">新增微信用户（${wxUserNum}）</a>
                            <a href="backend/account/index" class="btn btn-outline btn-primary btn-lg" role="button">新增账户（${accountNum}）</a>
                            <a href="backend/malfunction/index" class="btn btn-outline btn-primary btn-lg" role="button">新增报修（${malfunctionNum}）</a>
                            <a href="backend/record/index" class="btn btn-outline btn-primary btn-lg" role="button">新增缴费（${recordNum}）</a>
                        </div>
                    </div>
                </div>
            </div>

            <div class="panel-body">
                <h3>用户统计信息:</h3>

                <div class="col-sm-12">
                    <table class="table table-striped table-bordered table-hover">
                        <colgroup>
                            <col class="gradeA odd"/>
                            <col class="gradeA even"/>
                            <col class="gradeA odd"/>
                            <col class="gradeA even"/>
                        </colgroup>
                        <thead>
                        <tr>
                            <td width="25%;" class="textAling">会员数</td>
                            <td width="25%;" class="textAling">${appUserCount}</td>
                            <td width="25%;" class="textAling">微信用户数</td>
                            <td width="25%;" class="textAling">${wxUserCount}</td>
                        </tr>
                        <tr>
                            <td width="25%;" class="textAling">账户数</td>
                            <td width="25%;" class="textAling">${accountCount}</td>
                            <td width="50%;" class="textAling" colspan="2"></td>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>

            <div class="panel-body">
                <h3>故障报修信息:</h3>

                <div class="col-sm-12">
                    <table class="table table-striped table-bordered table-hover">
                        <colgroup>
                            <col class="gradeA odd"/>
                            <col class="gradeA even"/>
                            <col class="gradeA odd"/>
                            <col class="gradeA even"/>
                        </colgroup>
                        <thead>
                        <tr width="100px">
                            <td width="25%;" class="textAling">故障报修总数</td>
                            <td width="25%;" class="textAling">${malfunctionCount}</td>
                            <td width="25%;" class="textAling">待处理故障</td>
                            <td width="25%;" class="textAling">${malfunctionCount0}</td>
                        </tr>
                        <tr>
                            <td width="25%;" class="textAling">处理中故障</td>
                            <td width="25%;" class="textAling">${malfunctionCount1}</td>
                            <td width="25%;" class="textAling">已处理故障</td>
                            <td width="25%;" class="textAling">${malfunctionCount2}</td>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>

            <div class="panel-body">
                <h3>统计访问:</h3>

                <div class="col-sm-12">
                    <table class="table table-striped table-bordered table-hover">
                        <colgroup>
                            <col class="gradeA odd"/>
                            <col class="gradeA even"/>
                            <col class="gradeA odd"/>
                        </colgroup>
                        <thead>
                        <tr>
                            <td width="25%;" class="textAling">今日访问</td>
                            <td width="25%;" class="textAling">${visitCount}</td>
                            <td width="50%;" class="textAling"></td>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </c:if>

    </div>

</div>

<%@ include file="inc/footer.jsp" %>
</body>
</html>